/*
 * 
 */
package com.roc.tag;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.opensymphony.xwork2.util.ValueStack;

/**
 * 
 * @author Administrator
 *
 */
public class NbspTag extends ComponentTagSupport {
	private String body;

	/**
	 * 
	 */
	private static final long serialVersionUID = 7968843559136964067L;

	
	@Override
	public Component getBean(ValueStack stack, HttpServletRequest req,
			HttpServletResponse res) {
		if (bodyContent != null) {
			body = bodyContent.getString();
		}
		NbspBeanInfo bean = new NbspBeanInfo(stack);
		bean.setBody(body);
		return bean;
	}
    protected void populateParams() {
        super.populateParams();
        NbspBeanInfo tag = (NbspBeanInfo)component;
        tag.setBody(body);
    }
	/**
	 * @return the body
	 */
	public String getBody() {
		return body;
	}
	/**
	 * @param body the body to set
	 */
	public void setBody(String body) {
		this.body = body;
	}

}
